package cn.edu.scau.cmi.huangxiaodong.comprehensive;
import cn.edu.scau.cmi.huangxiaodong.comprehensive.util.ShowInterface;
import cn.edu.scau.cmi.huangxiaodong.comprehensive.util.Subject;
import cn.edu.scau.cmi.huangxiaodong.comprehensive.util.SysControl;
import cn.edu.scau.cmi.huangxiaodong.comprehensive.util.SaveData;
import javafx.application.Application;
import  javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.stage.Stage;
import java.io.File;
import java.io.IOException;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.Group;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.beans.property.SimpleStringProperty;


public class Main extends Application {
	
	
    public static void main(String[] args) {
        launch(args);
    }
    File infile;
    File outfile;
    SysControl scl;
    Subject[] subjects;
    ShowInterface showInterface;
    SaveData saveData;
    @Override
    public void start(Stage stage) {
    
    	try {
    		 infile1=new File("D:","StudentReportCard.txt");
    		 
    		scl=new SysControl(infile1);
    		subjects=scl.getSubjectArray();
    		 
    		showInterface=new ShowInterface(subjects);
    		stage=showInterface.getStage();
    	    stage.show();
    	    outfile=new File("D:","StudentReportOutCard.txt");
    	    saveData=new SaveData(outfile,subjects,scl.getSize()); 
    	     //   System.out.println("here");
 		 
    	}
    	catch(Exception e){
    		System.out.println(e);
    	}
     
    }
 
   
} 